<div class="tabbable">
  <ul class="nav nav-tabs">
    <% Currency.all.each_with_index do |ccy, i| %>
      <li class="nav-item">
        <% name = ccy.fiat? ? :fiat : ccy.code %>
        <a class="nav-link <%= 'active' if i.zero? %> <%= name %>-proof" href="#<%= name %>-proof" data-toggle="tab">
          <%= t(".verify-#{ccy.type}", currency: ccy.code.upcase).html_safe %>
        </a>
      </li>
    <% end %>
  </ul>

  <div class="tab-content">
    <% Currency.all.each_with_index do |ccy, i| %>
      <% name    = ccy.fiat? ? 'fiat' : ccy.code %>
      <% proof   = instance_variable_get(:"@#{name}_proof") %>
      <% account = instance_variable_get(:"@#{name}_account") %>
      <div id="<%= name %>-proof" class="tab-pane<%= ' active' if i.zero? %>">
        <div class="trade-wrapper">
          <div class="assets">
            <span class="title"><%= t(".#{ccy.type}-assets-total", currency: ccy.code.upcase).html_safe %></span>
            <span class="currency">
              <%= proof.present? ? proof.sum : t('private.assets.liability_proof_generation') %>
            </span>
          </div>
          <%= render 'liability_data', account: account, proof: proof %>
        </div>
      </div>
    <% end %>
  </div>
</div>
